#ifndef VR_IMPL_H_
#define VR_IMPL_H_

#include "config.h"

#ifdef USE_LIBOVR
#include <OVR.h>

using namespace OVR;
#endif

struct VRContext {
#ifdef USE_LIBOVR
	DeviceManager *ovr_devman;
	HMDDevice *ovr_hmd_dev;
	SensorDevice *ovr_sensor_dev;
	SensorFusion *ovr_sfusion;
#endif

	struct {
		char *display;
		int display_xoffs, display_yoffs;

		// the full width and height of the display (both eyes)
		int width, height;
		float fov;
		// the full aspect ratio of the display (both eyes)
		float aspect;
		float ipd;
		float distort[4];
		// the right lens center offset (negate for left)
		float lens_center_offset;
		float proj_center_offset;
		float scale;	// scaling to be applied to the two views to fill the screen
	} info;
};

extern VRContext vr_ctx;

bool vr_gl_init();

#endif	// VR_IMPL_H_
